import http from "@/api/httpApi/base/http.js";


//获取商品分类列表
export const getCommodityList = (page = 1, size = 10, projectId = "", categoryId = "", name = "") => {
    return http.requestGet("/admin/commodity/list/" + page + "/" + size + "?categoryId=" + categoryId + "&projectId=" + projectId + "&name=" + name);
};

//修改商品
export const updateCommodity = (commodityCategory) => {
    return http.requestPut("/admin/commodity", commodityCategory);
};

//添加商品
export const addCommodity = (commodityCategory) => {
    return http.requestPost("/admin/commodity", commodityCategory);
};

//编辑商品
export const editCommodity = (commodityCategory) => {
    return http.requestPut("/admin/commodity", commodityCategory);
};

//删除商品
export const delCommodity = (ids) => {
    return http.requestDeleteArr("/admin/commodity", "id", ids);
};
